public class Enumeration02 {
    public static void main(String[] args) {
        System.out.println(Season02.SPRING);
        System.out.println(Season02.SUMMER);
        System.out.println(Season02.AUTUMN);
        System.out.println(Season02.WINNER);
    }
}
//使用enum实现枚举类：
//1.enum代替class
//2.定义常量对象，要写在最前面（格式如下）
//3.其它的一样，可以提供get方法但是不能提供set方法
//使用enum其实隐式地继承了Enum
enum Season02 {
    //枚举常量是静态性质的
    SPRING("春天", "温暖的"),SUMMER("夏天", "炎热的"),AUTUMN("秋天","凉爽的"),WINNER("冬天","寒冷的");
    //可以直接通过无参构造器创建SPRING,SUMMER,AUTUMN,WINNER,但前提是无参构造器没有被覆盖
    private String name;
    private String description;

    private Season02(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return "Season{" +
                "name='" + name + '\'' +
                ", description='" + description + '\'' +
                '}';
    }
}
